{extend name="layout:base" /}{block name="content"}
<?php
$global = 0;
if($LoginUserInfo['Group']['id']==1)
{
$global = 1;
}
?>
<style>
.table th{text-align:center;}
.tip{position:absolute;background:#9FC;border-color:#F60;z-index:9999;filter:alpha(opacity=80);-moz-opacity:0.8;-khtml-opacity: 0.8;opacity: 0.8;}
.hidden-detail{display:none;}
.mypointer{width:95%;overflow:hidden;height:25px;line-height:25px;cursor: pointer;}
</style>

<link rel="stylesheet" type="text/css" href="/static/admin/css/style.css" />
<script src="/static/mimi/js/confirm/js/jquery-1.9.1.js"></script>
<script src="/static/bootstrap/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="/static/mimi/css/animate.min.css" type="text/css" />
<link rel="stylesheet" href="/static/mimi/css/font-awesome.min.css" type="text/css" />
   
<section class="topBanners">
   <div class="icon"></div>
   <div class="topBannersNav">
   		<span data-url="/admin/ad/lists" onclick="ContentLoadGo('/admin/tip/lists')">举报列表</span>
   </div>
</section>

<section id="serach_section" style="margin-top:10px;margin-left:auto;margin-right:auto;">
      <select name="ser_key" id="ser_key" class="select" >

          <option value="content" <?php if($request['ser_key']=="content"){echo 'selected';} ?>>举报内容</option>
      </select>
      <input type="text" class="textbox" name="ser_val" id="ser_val" value="<?php echo $request['ser_val']; ?>" placeholder=""/>

      <select id="ser_stats" class="ser_stats select" name="ser_stats">
          <option value="">--状态--</option>
          <option value="0" <?php if($request['ser_stats']=='0'){echo 'selected';} ?> >未处理</option>
          <option value="1" <?php if($request['ser_stats']=='1'){echo 'selected';} ?> >已处理</option>
      </select>
    

    
      <input type="button" value="搜索" class="group_btn research" id="resource" page="1" />
      	
      <br style="clear:both;width:0px;height:0px;">
</section>
 
<table class="table" style="margin-top:10px;">
<tr>
<th style="width:50px;">ID</th>
<th style="width:100px;">举报时间</th>
<th style="width:50px;">举报人</th>
<th style="width:150px;">举报文章</th>
<th style="width:150px;">举报内容</th>
<th style="width:50px;">状态</th>

<th style="width:80px;">操作</th>
</tr>
<?php 
foreach($lists['data'] as $key=>$val)
{
?>
<tr data-id="<?php echo $val['id']; ?>">
<td style="text-align:left;"><?php echo $val['id']; ?></td>
<td style="text-align:left;"><?php echo $val['ctime']; ?></td>
<td style="text-align:left;"><?php echo $val['UserInfo']['nickname']; ?></td>

<td style="text-align:left;">
<div class="mypointer" data-toggle="tooltip"
data-placement="bottom" title="[id:<?php echo $val['tid']?>]<?php echo $val['noteTitle']; ?>" style="text-align: left;">[id:<?php echo $val['tid']?>]<?php echo $val['noteTitle']; ?></div>
</td>

<td style="text-align:left;">
<div class="mypointer" data-toggle="tooltip"
data-placement="bottom" title="<?php echo $val['content']; ?>" style="text-align: left;"><?php echo $val['content']; ?></div>
</td>

    <td style="text-align:right;">
<?php
if($val['status']=='0')
{
        echo '未处理';
}else
{
    echo '已处理';
}
?>
</td>


<td style="text-align:right;">
<?php
if($val['status']=='0')
{
?>
<input type="button" power="30300" value="处理" class="link_btn deal"/>
<?php 
}?>





</td>
</tr>

<?php
}
?>
</table>
{include file="../application/admin/view/layout/page_tpl_new.html" /}
<script type="text/javascript">
function myResearch(){
    var url="/admin/tip/lists";
    var page=$("#cpage").val();
	var ser_key =$("#ser_key").val();
	var ser_val =$("#ser_val").val();
	var ser_stats =$("#ser_stats").val();
	var param={
			   ser_key:ser_key, 
			   ser_val:ser_val, 
			   ser_stats:ser_stats,
			   page:page
	   };
    ContentLoadGo(url,param);
}

$(function(){
 //设置搜索栏
 $(".research").unbind().bind("click",function(){
    var page =$(this).attr("page");
    $("#cpage").val(page);
    myResearch();
 });
 //上架
$(".deal").unbind().bind("click",function(){
   var that =this;
   var url="/admin/tip/deal";
   var id=$(that).parent().parent().attr('data-id');
   var param={
           id:id
   };
   cofirmsss_tishi(1,'您确定要执行该操作吗？',function(id){

       AjaxRequest(url,param,function(data){
           if(data.err==0)
           {
               SuccessTiShi("操作成功");

               $(that).parent().parent().remove();
               myResearch();
           }
           else
           {
               ErrTiShi(data.msg);
           }
       });

   });
});


});
</script>
{/block}
   